<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?php 
	$ci = & get_instance();
	if(!isUserLogin()){
		redirect(site_url());exit();
	}
	$USER = $ci->user_entity->init('id', getUserId());
	$transactionHistory = $ci->transaction_entity->getArrayListOfTransaction($USER->getId());
?>
<div id="center_content">
	<div class="clrboth"></div>
	<div class="block">
		<div class="title" style="position:relative;">
			<h3 class="bold"><a href="<?php echo site_url("cricket/user/dashboard")?>">Dashboard</a> &raquo; Transaction History</h3>
			<a class="back_button2" href="<?php echo site_url("cricket/user/dashboard")?>" title="Back?">Back?</a>	
		</div>
		<div class="clrboth"></div>
		<div class="content">
			<div class="rowitem3">
				<div class="clrboth"></div>
				<table class="summary">
					<thead>
						<td width="30%">Package</td>
						<td width="20%">Price (USD)</td>
						<td width="30%">Date Time</td>
						<td width="20%">Type</td>
					</thead>
					<tbody>
						<?php foreach($transactionHistory as $item): ?>
							<?php $PACKAGE = $ci->coin_packages_entity->init('id', $item->package_id); ?>
							<tr>
								<td><?php echo $PACKAGE->getPackage();?></td>
								<td style="text-align:right;"><?php echo format_Money($PACKAGE->getCost(),true);?>&nbsp;</td>
								<td><?php echo sysDateTimeFormat($item->crDate);?></td>
								<td>Paypal</td>	
							</tr>
						<?php endforeach;?>
					</tbody>
				</table>
			</div>	
			<div class="clrboth"></div>
		</div>
	</div>	
	<div class="clrboth"></div>
</div>
